# @Author：silence
# @Email：792245022@qq.com
# @Date：2025/3/10 2:32

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from webdriver_manager.chrome import ChromeDriverManager

options = Options()
options.add_argument('--headless')
options.add_argument('--disable-gpu')

browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)

browser.get('https://www.baidu.com')
browser.find_element(By.ID, 'kw').send_keys('python')
browser.find_element(By.ID, 'su').click()

browser.save_screenshot("baidu.png")
